package cn.yunlang.zhangZhongFei.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

@Data
@TableName("t_sys_user")
@ApiModel(value = "SysUser对象", description = "系统管理员表")
public class SysUser implements Serializable {

  private static final long serialVersionUID = 1L;

  @ApiModelProperty(value = "id", hidden = true)
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  @ApiModelProperty("openId")
  @TableField("open_id")
  private Integer openId;

  @ApiModelProperty("昵称")
  @TableField("username")
  private String username;

  @ApiModelProperty("密码")
  @TableField("password")
  private String password;

  @ApiModelProperty(value = "盐", hidden = true)
  @TableField("salt")
  private String salt;

  @ApiModelProperty("头像")
  @TableField("avatar")
  private String avatar;

  @ApiModelProperty("电话")
  @TableField("phone")
  private String phone;

  @ApiModelProperty("是否删除(0=否，1=是)")
  @TableField("is_delete")
  @TableLogic
  private String isDelete;

  @ApiModelProperty("创建时间")
  @TableField(value = "create_time", fill = FieldFill.INSERT)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date createTime;

  @ApiModelProperty("修改时间")
  @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date updateTime;

  @ApiModelProperty("token")
  @TableField("token")
  private String token;
}
